import { request } from '@/axios/request'

// 问诊查询
export function getConsultation(userId: number, sessionId: string) {
  return request({
    url: '/api/health/user/inquiry/verify/v1/findCurrentInquiryRecord',
    headers: {
      userId: userId,
      sessionId: sessionId,
      'Content-Type': 'application/json'
    },
    method: 'GET'
  })
}
//结束问诊
export function endpingData(userId: number, sessionId: string, recordId: object) {
  return request({
    url: '/api/health/user/inquiry/verify/v1/endInquiry',
    headers: {
      userId: userId,
      sessionId: sessionId,
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    method: 'PUT',
    params: { recordId }
  })
}
//查看历史问诊
export function gethistoryDta(userId: number, sessionId: string, data: any) {
  return request({
    url: '/api/health/user/inquiry/verify/v1/findHistoryInquiryRecord',
    headers: {
      userId: userId,
      sessionId: sessionId,
      'Content-Type': 'application/json'
    },
    method: 'GET',
    params: data
  })
}
//评论问诊服务
export function getpingData(userId: number, sessionId: string, data: any) {
  return request({
    url: '/api/health/user/inquiry/verify/v1/evaluationInquiry',
    headers: {
      userId: userId,
      sessionId: sessionId,
      'Content-Type': 'application/json'
    },
    method: 'PUT',
    params: data
  })
}
//查询礼物列表
export function getgridData() {
  return request({
    url: '/api/health/user/inquiry/v1/findGiftList',
    headers: {
      'Content-Type': 'application/json'
    },
    method: 'GET'
  })
}
//送礼物
export function getgridliData(userId: number, sessionId: string, data: any) {
  return request({
    url: '/api/health/user/inquiry/verify/v1/handselGift',
    headers: {
      userId: userId,
      sessionId: sessionId,
      'Content-Type': 'application/json'
    },
    method: 'PUT',
    params: data
  })
}
//历史评价
export function historyDta(userId: number, sessionId: string, data: any) {
  return request({
    url: '/api/health/user/inquiry/verify/v1/findDoctorEvaluate',
    headers: {
      userId: userId,
      sessionId: sessionId,
      'Content-Type': 'application/json'
    },
    method: 'GET',
    params: data
  })
}
